@model ShivamEMR.Model.Domain.PatientDomain.Insurance

@* This partial view defines form fields that will appear when creating and editing entities *@

<div class="editor-label">
    @Html.LabelFor(model => model.CardNo)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.CardNo)
    @Html.ValidationMessageFor(model => model.CardNo)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.StartDate)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.StartDate)
    @Html.ValidationMessageFor(model => model.StartDate)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.EndDate)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.EndDate)
    @Html.ValidationMessageFor(model => model.EndDate)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Notes)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Notes)
    @Html.ValidationMessageFor(model => model.Notes)
</div>

<div class="editor-label">
    Patient
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.PatientID, ((IEnumerable<ShivamEMR.Model.Domain.PatientDomain.Patient>)ViewBag.PossiblePatients).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Title), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.PatientID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.PatientID)
</div>
<div class="editor-label">
    Company
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.CompanyID, ((IEnumerable<ShivamEMR.Model.Domain.CompanyDomain.Company>)ViewBag.PossibleCompanies).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Name), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.CompanyID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.CompanyID)
</div>
<div class="editor-label">
    InsurancePlan
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.InsurancePlanID, ((IEnumerable<ShivamEMR.Model.Domain.PatientDomain.InsurancePlan>)ViewBag.PossibleInsurancePlans).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Name), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.InsurancePlanID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.InsurancePlanID)
</div>
<div class="editor-label">
    InsuranceCategory
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.InsuranceCategoryID, ((IEnumerable<ShivamEMR.Model.Domain.PatientDomain.InsuranceCategory>)ViewBag.PossibleInsuranceCategories).Select(option => new SelectListItem {
        Text = Html.DisplayTextFor(_ => option).ToString(), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.InsuranceCategoryID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.InsuranceCategoryID)
</div>
<div class="editor-label">
    InsuranceStatus
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.InsuranceStatusID, ((IEnumerable<ShivamEMR.Model.Domain.PatientDomain.InsuranceStatus>)ViewBag.PossibleInsuranceStatus).Select(option => new SelectListItem {
        Text = Html.DisplayTextFor(_ => option).ToString(), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.InsuranceStatusID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.InsuranceStatusID)
</div>
